package com.colldown.iservice.dataShow.dao.impl;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.colldown.iservice.dataShow.dao.IDataShowDao;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@Repository
public class DataShowDaoImpl implements IDataShowDao {
	 @Autowired  
	 protected SqlSessionTemplate sqlSessionTemplate;


	@Override
	public List queryAddrDateCharts(Map map) {
		return this.sqlSessionTemplate.selectList("com.iservice.datashow.queryAddrDateCharts",map);
	}
	/**
	 * 根据设备ids集查询设备备注信息
	 * @param paramMap
	 * @return
	 */
	public List queryDeviceListByIds(Map paramMap){
		return this.sqlSessionTemplate.selectList("com.iservice.datashow.queryDeviceListByIds", paramMap);
	}
	/**
	* @Title: queryMaxMinAvgSec
	* @Description: TODO(查询最大、最小、平均延迟)
	* @param paramMap
	 */
	public List queryMaxMinAvgSec(Map paramMap){
		return this.sqlSessionTemplate.selectList("com.iservice.datashow.queryMaxMinAvgSec",paramMap);
	}

	/**
	* @Title: queryMaxMinAvgSec
	* @Description: TODO(查询在某一延迟区间内设备个数)
	* @param paramMap
	 */
	public int queryDeviceNumByDelaySec(Map paramMap) {
		return this.sqlSessionTemplate.selectOne("com.iservice.datashow.queryDeviceNumByDelaySec",paramMap);
	}	
}
